package org.bbmall.bean.member;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 会员等级分布展示实体类
 * 对应数据库表：ads_member_level_display
 */
@Data
@TableName("ads_member_level_display")
public class AdsMemberLevelDisplay {

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 统计日期
     */
    @TableField("stat_date")
    private LocalDate statDate;

    /**
     * 会员等级
     */
    @TableField("member_level")
    private String memberLevel;

    /**
     * 会员数量
     */
    @TableField("member_count")
    private Integer memberCount;

    /**
     * 占比
     */
    @TableField("member_percentage")
    private BigDecimal memberPercentage;

    /**
     * 累计消费
     */
    @TableField("total_consumption")
    private BigDecimal totalConsumption;

    /**
     * 人均消费
     */
    @TableField("avg_consumption")
    private BigDecimal avgConsumption;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}